steps_for(:add_show) do
  Given "a user" do
  end
  
  Given "there are no shows in the system" do
    Show.destroy_all
  end
  
  When "the user clicks on the 'new show' link" do
    post shows_path(:action => 'new')
  end
  
  Then "a 'new show' form will be present" do
    assert_select "#show_form form", nil, "Didn't see the show form"
  end
  
  Then "we see the body of the response" do
    puts @response.body
  end
  
  Then "a user adds the show entitled $title, with the rss feed $rss_url" do |title, rss_url|
    @show_title = title
    @show_rss =  rss_url
    post "/shows/create", :show => {:title => @show_title, :rss_url => @show_rss}
  end
  
  Then "a show should be in the system entitled $title with the rss feed $rss_url" do |title, rss_url|
    Show.count.should == 1
  end
  
  Then "a user adds the show entitled $title, with no rss feed" do |title|
    @show_title = title
    post "/shows/create", :show => {:title => @show_title, :rss_url => ""}
  end
  
  Then "there should be no shows in the system" do
    Show.count.should == 0
  end
  
  Then "the error $error_text is shown" do |error_text|
    puts response.body
    assert_select "#errorExplanation", nil, "Didn't see error message #{error_text}" do
      assert_select "ul", nil, "Didn't see list of errors" do
        assert_select "li", nil, "Didn't see the error"
      end
    end
  end
end